var colorConsole = require('./colorConsole')
var generate = require('./generateCode')

var run = function(obj) {
    if (obj == '-v') {
        colorConsole.help('version is 1.0.0')
    } else if (obj == '-h') {
        console.log('Useage:');
        console.log('  -v --version [show version]');
    } else {
      generate.generateCode(arguments[0])
    }
};
//获取除第一个命令以后的参数，使用空格拆分
run(process.argv.slice(2));
